package com.jin.webvideo.config;

import com.jin.webvideo.base.spring.thymeleaf.PermissionProcessorDialect;
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ThemleafConfig {
    @Bean
    public LayoutDialect layoutDialect() {
        return new LayoutDialect();
    }

    @Bean
    @ConditionalOnMissingBean
    public PermissionProcessorDialect permissionProcessorDialect() {
        return new PermissionProcessorDialect();
    }
}
